Optimal. Leaf size=84 \[ \frac {2 b \left (a^2-b^2\right ) \sec (c+d x)}{3 d}+\frac {\sec ^3(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{3 d}+\frac {2 a \left (a^2-b^2\right ) \tan (c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.238, Rules used = {2770, 12, 2748,
3852, 8} \begin {gather*} \frac {2 a \left (a^2-b^2\right ) \tan (c+d x)}{3 d}+\frac {2 b \left (a^2-b^2\right ) \sec (c+d x)}{3 d}+\frac {\sec ^3(c+d x) (a \sin (c+d x)+b) (a+b \sin (c+d x))^2}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 12
Rule 2748
Rule 2770
Rule 3852
Rubi steps
\begin {align*} \int \sec ^4(c+d x) (a+b \sin (c+d x))^3 \, dx &=\frac {\sec ^3(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{3 d}-\frac {1}{3} \int \left (-2 a^2+2 b^2\right ) \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx\\ &=\frac {\sec ^3(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{3 d}+\frac {1}{3} \left (2 \left (a^2-b^2\right )\right ) \int \sec ^2(c+d x) (a+b \sin (c+d x)) \, dx\\ &=\frac {2 b \left (a^2-b^2\right ) \sec (c+d x)}{3 d}+\frac {\sec ^3(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{3 d}+\frac {1}{3} \left (2 a \left (a^2-b^2\right )\right ) \int \sec ^2(c+d x) \, dx\\ &=\frac {2 b \left (a^2-b^2\right ) \sec (c+d x)}{3 d}+\frac {\sec ^3(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{3 d}-\frac {\left (2 a \left (a^2-b^2\right )\right ) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 d}\\ &=\frac {2 b \left (a^2-b^2\right ) \sec (c+d x)}{3 d}+\frac {\sec ^3(c+d x) (b+a \sin (c+d x)) (a+b \sin (c+d x))^2}{3 d}+\frac {2 a \left (a^2-b^2\right ) \tan (c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.43, size = 136, normalized size = 1.62 \begin {gather*} \frac {\sec ^3(c+d x) \left (24 a^2 b-4 b^3+\left (-9 a^2 b+15 b^3\right ) \cos (c+d x)-12 b^3 \cos (2 (c+d x))-3 a^2 b \cos (3 (c+d x))+5 b^3 \cos (3 (c+d x))+12 a^3 \sin (c+d x)+18 a b^2 \sin (c+d x)+4 a^3 \sin (3 (c+d x))-6 a b^2 \sin (3 (c+d x))\right )}{24 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.36, size = 122, normalized size = 1.45
method | result | size |
risch | \(-\frac {2 \left (9 i a \,b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+3 b^{3} {\mathrm e}^{5 i \left (d x +c \right )}-6 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}-12 a^{2} b \,{\mathrm e}^{3 i \left (d x +c \right )}+2 b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-2 i a^{3}+3 i a \,b^{2}+3 b^{3} {\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \left (1+{\mathrm e}^{2 i \left (d x +c \right )}\right )^{3}}\) | \(121\) |
derivativedivides | \(\frac {-a^{3} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+\frac {a^{2} b}{\cos \left (d x +c \right )^{3}}+\frac {a \,b^{2} \left (\sin ^{3}\left (d x +c \right )\right )}{\cos \left (d x +c \right )^{3}}+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{3 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}\right )}{d}\) | \(122\) |
default | \(\frac {-a^{3} \left (-\frac {2}{3}-\frac {\left (\sec ^{2}\left (d x +c \right )\right )}{3}\right ) \tan \left (d x +c \right )+\frac {a^{2} b}{\cos \left (d x +c \right )^{3}}+\frac {a \,b^{2} \left (\sin ^{3}\left (d x +c \right )\right )}{\cos \left (d x +c \right )^{3}}+b^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{3 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{3}\right )}{d}\) | \(122\) |
norman | \(\frac {-\frac {6 a^{2} b -4 b^{3}}{3 d}-\frac {2 a^{3} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {2 a^{3} \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (12 a^{2} b +8 b^{3}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (18 a^{2} b +4 b^{3}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a \left (a^{2}+6 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 a \left (a^{2}+6 b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {2 a \left (7 a^{2}+12 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {2 a \left (7 a^{2}+12 b^{2}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}-\frac {6 a^{2} b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {6 a^{2} b \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {4 b \left (15 a^{2}+8 b^{2}\right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}\) | \(318\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 80, normalized size = 0.95 \begin {gather*} \frac {3 \, a b^{2} \tan \left (d x + c\right )^{3} + {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{3} - \frac {{\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} b^{3}}{\cos \left (d x + c\right )^{3}} + \frac {3 \, a^{2} b}{\cos \left (d x + c\right )^{3}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 77, normalized size = 0.92 \begin {gather*} -\frac {3 \, b^{3} \cos \left (d x + c\right )^{2} - 3 \, a^{2} b - b^{3} - {\left (a^{3} + 3 \, a b^{2} + {\left (2 \, a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{3 \, d \cos \left (d x + c\right )^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right )^{3} \sec ^{4}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 5.74, size = 128, normalized size = 1.52 \begin {gather*} -\frac {2 \, {\left (3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 9 \, a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 2 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, a^{2} b - 2 \, b^{3}\right )}}{3 \, {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.25, size = 81, normalized size = 0.96 \begin {gather*} \frac {a^2\,b+\frac {a^3\,\sin \left (c+d\,x\right )}{3}+\frac {b^3}{3}-{\cos \left (c+d\,x\right )}^2\,\left (-\frac {2\,\sin \left (c+d\,x\right )\,a^3}{3}+\sin \left (c+d\,x\right )\,a\,b^2+b^3\right )+a\,b^2\,\sin \left (c+d\,x\right )}{d\,{\cos \left (c+d\,x\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________